package lesson20;

public class ExceptionDemo {

	public static void main(String[] args) {
	//	Person ivan = new Person();
		//Person maria = new Person();
		Person ivan = new Person("ivan");
		Person maria = new Person();
		//ivan.setName("Pesho");
		System.out.println(maria.hasSameName(ivan));
		
		/*try{
			ivan.hasSameName(maria);
		}
		catch(NullPointerException e)
		{
			System.out.println("NullPointer");
		}*/
		
		//System.out.println("Ivan and Maria");
		
		//System.out.println("Alabala");
	}

}
